/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "retaildetails")
@XmlRootElement(name = "retaildetails")
@NamedQueries({
    @NamedQuery(name = "Retaildetails.findAll", query = "SELECT r FROM Retaildetails r"),
    @NamedQuery(name = "Retaildetails.findByRetailShopID", query = "SELECT r FROM Retaildetails r WHERE r.retailShopID = :retailShopID"),
    @NamedQuery(name = "Retaildetails.findByRetailshopname", query = "SELECT r FROM Retaildetails r WHERE r.retailshopname = :retailshopname"),
    @NamedQuery(name = "Retaildetails.findByAddressline1", query = "SELECT r FROM Retaildetails r WHERE r.addressline1 = :addressline1"),
    @NamedQuery(name = "Retaildetails.findByAddressline2", query = "SELECT r FROM Retaildetails r WHERE r.addressline2 = :addressline2"),
    @NamedQuery(name = "Retaildetails.findByCity", query = "SELECT r FROM Retaildetails r WHERE r.city = :city"),
    @NamedQuery(name = "Retaildetails.findByState", query = "SELECT r FROM Retaildetails r WHERE r.state = :state"),
    @NamedQuery(name = "Retaildetails.findByPhone", query = "SELECT r FROM Retaildetails r WHERE r.phone = :phone"),
    @NamedQuery(name = "Retaildetails.findByTin", query = "SELECT r FROM Retaildetails r WHERE r.tin = :tin"),
    @NamedQuery(name = "Retaildetails.findByOpentime", query = "SELECT r FROM Retaildetails r WHERE r.opentime = :opentime"),
    @NamedQuery(name = "Retaildetails.findByClosetime", query = "SELECT r FROM Retaildetails r WHERE r.closetime = :closetime"),
    @NamedQuery(name = "Retaildetails.findByIsdeleted", query = "SELECT r FROM Retaildetails r WHERE r.isdeleted = :isdeleted")})
public class Retaildetails implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "RetailShopID")
    private Long retailShopID;
    @Column(name = "retailshopname")
    private String retailshopname;
    @Column(name = "addressline1")
    private String addressline1;
    @Column(name = "addressline2")
    private String addressline2;
    @Column(name = "city")
    private String city;
    @Column(name = "state")
    private String state;
    @Column(name = "phone")
    private String phone;
    @Column(name = "tin")
    private String tin;
    @Column(name = "opentime")
    private Integer opentime;
    @Column(name = "closetime")
    private Integer closetime;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    @JoinColumn(name = "businesstype_BusinesstypeID", referencedColumnName = "BusinesstypeID")
    @ManyToOne(optional = false)
    private Businesstype businesstype;

    public Retaildetails() {
    }

    public Retaildetails(Long retailShopID) {
        this.retailShopID = retailShopID;
    }

    public Long getRetailShopID() {
        return retailShopID;
    }

    public void setRetailShopID(Long retailShopID) {
        this.retailShopID = retailShopID;
    }

    public String getRetailshopname() {
        return retailshopname;
    }

    public void setRetailshopname(String retailshopname) {
        this.retailshopname = retailshopname;
    }

    public String getAddressline1() {
        return addressline1;
    }

    public void setAddressline1(String addressline1) {
        this.addressline1 = addressline1;
    }

    public String getAddressline2() {
        return addressline2;
    }

    public void setAddressline2(String addressline2) {
        this.addressline2 = addressline2;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getTin() {
        return tin;
    }

    public void setTin(String tin) {
        this.tin = tin;
    }

    public Integer getOpentime() {
        return opentime;
    }

    public void setOpentime(Integer opentime) {
        this.opentime = opentime;
    }

    public Integer getClosetime() {
        return closetime;
    }

    public void setClosetime(Integer closetime) {
        this.closetime = closetime;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Businesstype getBusinesstype() {
        return businesstype;
    }

    public void setBusinesstype(Businesstype businesstype) {
        this.businesstype = businesstype;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (retailShopID != null ? retailShopID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Retaildetails)) {
            return false;
        }
        Retaildetails other = (Retaildetails) object;
        if ((this.retailShopID == null && other.retailShopID != null) || (this.retailShopID != null && !this.retailShopID.equals(other.retailShopID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Retaildetails[retailShopID=" + retailShopID + "]";
    }

}
